# include <bits/stdc++.h>
using namespace std;
int ans = 1;
char temp[65];

struct node { 
    node *ne[26];
    vector <int> g;
} *root;

void insert(char str[]) { 
    int i = 0, index;
    node *p = root;
    while(str[i]) { 
        index = str[i] - 'A';
        if(!p->ne[index]) p->ne[index] = new node(), ans++;
        p = p->ne[index];
        i++;
    }
}

int main() { 
# ifndef LOCAL
    freopen("trie.in", "r", stdin);
    freopen("trie.out", "w", stdout);
# endif
    root = new node();
    while(~scanf("%s", temp)) { 
        insert(temp);
    }
    printf("%d\n", ans);
}
